package com.usefullc.user.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.usefullc.system.service.AbstractBizService;
import com.usefullc.user.domain.Position;
import com.usefullc.user.mapper.PositionMapper;
import com.usefullc.user.query.PositionQuery;
import org.springframework.stereotype.Service;

/**
 * @author: Sampson
 * @date: 2022-01-09 09:58
 */
@Service
public class PositionService extends AbstractBizService<PositionMapper,Position,PositionQuery> {


    @Override
    protected QueryWrapper<Position> getQueryWrapper(PositionQuery query) {
        QueryWrapper<Position> queryWrapper = super.getQueryWrapper(query);
        return queryWrapper;
    }

    public Position findByUserId(Long userId){
        PositionQuery query = new PositionQuery();
        query.setUserId(userId);
        return this.findOne(query);
    }




}
